#ifndef __INCosa_taskh
#define __INCosa_taskh

#include "osa_common.h"
#include <sched.h>
#include <pthread.h>
//#ifdef ESE_OS_WIN
//#pragma comment(lib, "pthreadVC2.lib")
//#endif

#define VX_SUPERVISOR_MODE	0x0001	/* OBSOLETE: tasks always in sup mode */
#define VX_UNBREAKABLE	  	0x0002	/* INTERNAL: breakpoints ignored */
#define VX_DEALLOC_STACK  	0x0004	/* INTERNAL: deallocate stack */
#define VX_FP_TASK          0x0008	/* 1 = f-point coprocessor support */
#define VX_STDIO            0x0010	/* OBSOLETE: need not be set for stdio*/
#define VX_ADA_DEBUG        0x0020	/* 1 = VADS debugger support */
#define VX_FORTRAN          0x0040	/* 1 = NKR FORTRAN support */
#define VX_PRIVATE_ENV      0x0080	/* 1 = private environment variables */
#define VX_NO_STACK_FILL    0x0100	/* 1 = avoid stack fill of 0xee */
#define VX_DSP_TASK         0x0200	/* 1 = dsp coprocessor support */
#define VX_ALTIVEC_TASK     0x0400  /* 1 = ALTIVEC coprocessor support */

typedef unsigned int		cpuset_t;

#ifdef __cplusplus
extern "C" {
#endif

	ESE_API int taskSpawn(char * name, int priority, int options, 
		int stackSize, FUNCPTR entryPt, int arg1,  
		int arg2, int arg3, int arg4, int arg5, 
		int arg6, int arg7, int arg8, int arg9, 
		int arg10);
	ESE_API STATUS taskCpuAffinitySet(int tid, cpuset_t newAffinity);
	ESE_API STATUS taskDelete(int tid);
	ESE_API STATUS taskDelay(int ticks);
	ESE_API STATUS taskIdVerify(int tid);
	ESE_API int taskIdSelf(void);

#ifdef __cplusplus
}
#endif

#endif